package com.cloud.salon.common.base.vo.business;

import com.cloud.salon.common.base.constant.RecordStatusConstant;
import com.cloud.salon.common.base.entity.business.Record;
import com.cloud.salon.common.base.util.ValueUtil;
import lombok.Data;

import java.util.Date;

/**
 * @Description 订单记录信息VO
 * @Author wolf--LZH
 * @CreateDate 2019/5/8 0008 下午 2:38
 */
@Data
public class RecordInfoVO {

    // 订单id
    private Integer id;
    // 会员卡号
    private String accountNum;
    // 收银员姓名
    private String staffName;
    // 总应付款
    private String totalPrice;
    // 订单状态
    private String status;
    // 订单日期
    private Date date;

    public RecordInfoVO() {
    }

    public RecordInfoVO(Record record, String accountNum, String staffName) {
        this.id = record.getId();
        this.accountNum = accountNum;
        this.staffName = staffName;
        this.totalPrice = ValueUtil.valueOf(2, record.getTotalPrice());
        this.status = RecordStatusConstant.getStatus(record.getStatus());
        this.date = record.getDate();
    }
}
